package com.broada.apm.indicator.api.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.broada.apm.dao.DimensionDao;
import com.broada.apm.indicator.api.DimensionService;
import com.broada.apm.model.Dimension.Area;
import com.broada.apm.model.Dimension.Browser;
import com.broada.apm.model.Dimension.Device;
import com.broada.apm.model.Dimension.Error;
import com.broada.apm.model.Dimension.OS;

public class DimensionServiceImpl implements DimensionService {

	@Autowired
	private DimensionDao dimensionDao;
	
	@Override
	public void addError(Error error) {
		dimensionDao.addError(error);
	}

	@Override
	public void updateError(Error error) {
		dimensionDao.updateError(error);
	}

	@Override
	public List<Error> getErrorByL7Protocol(int protocol) {
		return dimensionDao.getErrorByL7Protocol(protocol);
	}

	@Override
	public void deleteError(Error error) {
		dimensionDao.deleteError(error);
	}

	@Override
	public List<Browser> getAllBrowsers() {
		return dimensionDao.getAllBrowsers();
	}

	@Override
	public List<Device> getAllDevices() {
		return dimensionDao.getAllDevices();
	}

	@Override
	public List<OS> getAllOSs() {
		return dimensionDao.getAllOSs();
	}

	@Override
	public List<Area> getAllAreas() {
		return dimensionDao.getAllAreas();
	}

	@Override
	public List<Area> getRootArea() {
		return dimensionDao.getRootArea();
	}

	@Override
	public List<Area> getProvinceArea(String root) {
		return dimensionDao.getProvinceArea(root);
	}

	@Override
	public List<Area> getCityArea(String province) {
		return dimensionDao.getCityArea(province);
	}

	@Override
	public List<Area> getDistrictArea(String district) {
		return dimensionDao.getDistrictArea(district);
	}

	@Override
	public Error getErrorById(String id) {
		return dimensionDao.getErrorById(id);
	}

}
